<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>SettingsIcon.qml 示例文件 | Qt Quick Extras 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtquickextras-index.html">Qt Quick Extras</a></td><td ><a href="qtquickextras-flat-example.html">Qt Quick Extras - Flat</a></td><td >SettingsIcon.qml 示例文件</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquickextras-index.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">SettingsIcon.qml 示例文件</h1>
<span class="subtitle">flat/SettingsIcon.qml</span>
<!-- $$$flat/SettingsIcon.qml-description -->
<div class="descr"> <a name="details"></a>
<pre class="qml">

  <span class="comment">/****************************************************************************
  **
  ** Copyright (C) 2016 The Qt Company Ltd.
  ** Contact: https://www.qt.io/licensing/
  **
  ** This file is part of the examples of the Qt Toolkit.
  **
  ** $QT_BEGIN_LICENSE:BSD$
  ** Commercial License Usage
  ** Licensees holding valid commercial Qt licenses may use this file in
  ** accordance with the commercial license agreement provided with the
  ** Software or, alternatively, in accordance with the terms contained in
  ** a written agreement between you and The Qt Company. For licensing terms
  ** and conditions see https://www.qt.io/terms-conditions. For further
  ** information use the contact form at https://www.qt.io/contact-us.
  **
  ** BSD License Usage
  ** Alternatively, you may use this file under the terms of the BSD license
  ** as follows:
  **
  ** &quot;Redistribution and use in source and binary forms, with or without
  ** modification, are permitted provided that the following conditions are
  ** met:
  **   * Redistributions of source code must retain the above copyright
  **     notice, this list of conditions and the following disclaimer.
  **   * Redistributions in binary form must reproduce the above copyright
  **     notice, this list of conditions and the following disclaimer in
  **     the documentation and/or other materials provided with the
  **     distribution.
  **   * Neither the name of The Qt Company Ltd nor the names of its
  **     contributors may be used to endorse or promote products derived
  **     from this software without specific prior written permission.
  **
  **
  ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  ** &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&quot;
  **
  ** $QT_END_LICENSE$
  **
  ****************************************************************************/</span>

  import QtQuick 2.4

  <span class="type"><a href="../qtquick/qml-qtquick-canvas.html">Canvas</a></span> {
      <span class="name">onPaint</span>: {
          var ctx = <span class="name">getContext</span>(<span class="string">&quot;2d&quot;</span>);
          <span class="name">ctx</span>.<span class="name">reset</span>();

          <span class="name">ctx</span>.<span class="name">scale</span>(<span class="name">width</span>, <span class="name">height</span>);

          <span class="name">ctx</span>.<span class="name">beginPath</span>();
          <span class="name">ctx</span>.<span class="name">moveTo</span>(<span class="number">0.706</span>,<span class="number">0.542</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.709</span>,<span class="number">0.527</span>,<span class="number">0.711</span>,<span class="number">0.512</span>,<span class="number">0.711</span>,<span class="number">0.49700000000000005</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.711</span>,<span class="number">0.4820000000000001</span>,<span class="number">0.709</span>,<span class="number">0.465</span>,<span class="number">0.706</span>,<span class="number">0.451</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.752</span>,<span class="number">0.41600000000000004</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.759</span>,<span class="number">0.41</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.756</span>,<span class="number">0.4</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.756</span>,<span class="number">0.399</span>,<span class="number">0.749</span>,<span class="number">0.382</span>,<span class="number">0.737</span>,<span class="number">0.36200000000000004</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.725</span>,<span class="number">0.3420000000000001</span>,<span class="number">0.714</span>,<span class="number">0.328</span>,<span class="number">0.714</span>,<span class="number">0.327</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.708</span>,<span class="number">0.319</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.698</span>,<span class="number">0.324</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.645</span>,<span class="number">0.346</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.623</span>,<span class="number">0.32499999999999996</span>,<span class="number">0.595</span>,<span class="number">0.309</span>,<span class="number">0.5650000000000001</span>,<span class="number">0.3</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.558</span>,<span class="number">0.243</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.557</span>,<span class="number">0.23299999999999998</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.547</span>,<span class="number">0.23099999999999998</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.546</span>,<span class="number">0.23099999999999998</span>,<span class="number">0.528</span>,<span class="number">0.22799999999999998</span>,<span class="number">0.505</span>,<span class="number">0.22799999999999998</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.481</span>,<span class="number">0.22799999999999998</span>,<span class="number">0.463</span>,<span class="number">0.23099999999999998</span>,<span class="number">0.463</span>,<span class="number">0.23099999999999998</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.453</span>,<span class="number">0.23299999999999998</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.452</span>,<span class="number">0.243</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.444</span>,<span class="number">0.299</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.41400000000000003</span>,<span class="number">0.308</span>,<span class="number">0.387</span>,<span class="number">0.324</span>,<span class="number">0.364</span>,<span class="number">0.345</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.312</span>,<span class="number">0.323</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.302</span>,<span class="number">0.319</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.296</span>,<span class="number">0.327</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.296</span>,<span class="number">0.327</span>,<span class="number">0.284</span>,<span class="number">0.342</span>,<span class="number">0.27299999999999996</span>,<span class="number">0.362</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.26</span>,<span class="number">0.383</span>,<span class="number">0.254</span>,<span class="number">0.399</span>,<span class="number">0.254</span>,<span class="number">0.4</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.25</span>,<span class="number">0.41</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.258</span>,<span class="number">0.416</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.303</span>,<span class="number">0.45099999999999996</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.3</span>,<span class="number">0.465</span>,<span class="number">0.299</span>,<span class="number">0.48</span>,<span class="number">0.299</span>,<span class="number">0.497</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.299</span>,<span class="number">0.513</span>,<span class="number">0.3</span>,<span class="number">0.528</span>,<span class="number">0.304</span>,<span class="number">0.543</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.259</span>,<span class="number">0.577</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.25</span>,<span class="number">0.584</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.254</span>,<span class="number">0.593</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.254</span>,<span class="number">0.594</span>,<span class="number">0.261</span>,<span class="number">0.61</span>,<span class="number">0.273</span>,<span class="number">0.63</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.28500000000000003</span>,<span class="number">0.65</span>,<span class="number">0.29500000000000004</span>,<span class="number">0.664</span>,<span class="number">0.29600000000000004</span>,<span class="number">0.665</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.30200000000000005</span>,<span class="number">0.673</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.31200000000000006</span>,<span class="number">0.669</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.36500000000000005</span>,<span class="number">0.647</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.38700000000000007</span>,<span class="number">0.668</span>,<span class="number">0.41400000000000003</span>,<span class="number">0.684</span>,<span class="number">0.44400000000000006</span>,<span class="number">0.6930000000000001</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.45200000000000007</span>,<span class="number">0.7510000000000001</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.45300000000000007</span>,<span class="number">0.7620000000000001</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.4640000000000001</span>,<span class="number">0.7630000000000001</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.4640000000000001</span>,<span class="number">0.7630000000000001</span>,<span class="number">0.4820000000000001</span>,<span class="number">0.7640000000000001</span>,<span class="number">0.5060000000000001</span>,<span class="number">0.7640000000000001</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.5300000000000001</span>,<span class="number">0.7640000000000001</span>,<span class="number">0.5470000000000002</span>,<span class="number">0.7620000000000001</span>,<span class="number">0.5480000000000002</span>,<span class="number">0.7620000000000001</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.5580000000000002</span>,<span class="number">0.7610000000000001</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.5590000000000002</span>,<span class="number">0.7510000000000001</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.5660000000000002</span>,<span class="number">0.6940000000000001</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.5960000000000002</span>,<span class="number">0.685</span>,<span class="number">0.6230000000000002</span>,<span class="number">0.669</span>,<span class="number">0.6460000000000001</span>,<span class="number">0.648</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.6990000000000002</span>,<span class="number">0.67</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.7090000000000002</span>,<span class="number">0.674</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.7150000000000002</span>,<span class="number">0.665</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.7150000000000002</span>,<span class="number">0.665</span>,<span class="number">0.7260000000000002</span>,<span class="number">0.65</span>,<span class="number">0.7370000000000002</span>,<span class="number">0.63</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.7490000000000002</span>,<span class="number">0.61</span>,<span class="number">0.7560000000000002</span>,<span class="number">0.594</span>,<span class="number">0.7560000000000002</span>,<span class="number">0.593</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.7600000000000002</span>,<span class="number">0.584</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.751</span>,<span class="number">0.577</span>);
          <span class="name">ctx</span>.<span class="name">lineTo</span>(<span class="number">0.706</span>,<span class="number">0.542</span>);
          <span class="name">ctx</span>.<span class="name">closePath</span>();
          <span class="name">ctx</span>.<span class="name">moveTo</span>(<span class="number">0.505</span>,<span class="number">0.622</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.436</span>,<span class="number">0.622</span>,<span class="number">0.38</span>,<span class="number">0.566</span>,<span class="number">0.38</span>,<span class="number">0.497</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.38</span>,<span class="number">0.428</span>,<span class="number">0.436</span>,<span class="number">0.372</span>,<span class="number">0.505</span>,<span class="number">0.372</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.5740000000000001</span>,<span class="number">0.372</span>,<span class="number">0.63</span>,<span class="number">0.428</span>,<span class="number">0.63</span>,<span class="number">0.497</span>);
          <span class="name">ctx</span>.<span class="name">bezierCurveTo</span>(<span class="number">0.63</span>,<span class="number">0.565</span>,<span class="number">0.574</span>,<span class="number">0.622</span>,<span class="number">0.505</span>,<span class="number">0.622</span>);
          <span class="name">ctx</span>.<span class="name">closePath</span>();
          <span class="name">ctx</span>.<span class="name">fillStyle</span> <span class="operator">=</span> <span class="string">&quot;#333333&quot;</span>;
          <span class="name">ctx</span>.<span class="name">fill</span>();
      }
  }

</pre>
</div>
<!-- @@@flat/SettingsIcon.qml -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
